import request from '@/utils/http.js'

export default {
	getUserInfo() {
	  return request({
	    url: '/user/getUserInfo',
	    method: 'GET',
			showLoading: true,
	  })
	},
	
	updateUserInfo(data){
		return request({
		  url: '/user/updateUserInfo',
		  method: 'POST',
			data: data,
			showLoading: true,
		})
	},



  updateimg(haedPortrait) {
    console.log('准备上传的头像路径:', haedPortrait)
    return request({
      url: `/user/saveimg?haedPortrait=${encodeURIComponent(haedPortrait)}`,
      method: 'POST',
      showLoading: true
    })
  }

	
}




